using System;
using UnityEngine;
using UnityEngine.UI;

public class PopUpPassword : MonoBehaviour
{
	public InputField ServerNameText;

	[NonSerialized]
	public string Password;

	private Popup popup;

	private void Start()
	{
		popup = (Popup)UnityEngine.Object.FindObjectOfType(typeof(Popup));
	}

	private void OnEnable()
	{
		Password = string.Empty;
		if ((bool)ServerNameText)
		{
			ServerNameText.text = Password;
		}
	}

	public void SetPassword(InputField num)
	{
		Password = num.text;
	}

	public void Close()
	{
		popup.Option2();
	}

	public void Ok()
	{
		popup.Option1();
	}
}
